POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
10 Aug 2024 09:14:47 EDT (-0400)
  Re: The Language of POV-Ray  
From: Daren Scot Wilson
Date: 8 Apr 2000 22:07:11
Message: <38efe5cf@news.povray.org>
Thoughts on XML and POVRay...

I have been away from POV-Ray for a while, busy with other things.  
So when I first saw this thread a while ago, I thought "Oh-oh, there goes 
the neighborhood!  Now what are they up to?"

  I agree with computer scientists such as Don Knuth and Ian Joyner, 
who have written extensively on programming languages - one of their
main points being that the scripts written in a well-designed language 
needs to be easy for humans to write and to read, even if it's ultimately
destined for the machine.   Software today has so much power to parse 
very complex languages, with very complex data models, there's no 
reason to design languages to make life easy for the computer.

  So what if the parser is complicated?  It needs to be written only once.
(Well, in an ideal world.)   If there comes  to be a need for several apps 
or utilities to parse the language, a parser can be written and packaged 
as a shared library or component.  

   A human-friendly language that is difficult to parse puts only a few
programmers temporarily at an inconvenience.

   An language that is easy to parse, but hard to for humans to deal with, 
puts many users at an inconvenience for a long time.    


The weakness about XML that worries me is that XML is designed to 
describe structure and meanings and properties of parts of that structures,
not process.   That may sound good for geometric models, which are 
structures with associated properties.  But 3D scenes have patterns in
there structures, often which can easily be described algorithmically - that
is,
by "how to" descriptions, rather than "what and where" descriptions.

Consider Postscript - a powerful way of describing where to put ink 
on a page.  Because it allows transformations, loops, and subroutines - and 
is in fact a general purpose programming language - it has a lot of power. 
Even at the most basic level, just about every text document involves letters
arranged serially left to right, and this is described easily by a process of
moving a "current point" according to letter  width, assumed by the
interpreter, but one can apply commands and define subroutines to make 
very complex documents.

  In contrast,  XML -- or HTML (since i am more familiar with it) merely 
says "This is a paragraph"   or "this is the radius".   It seems to me a
"verbless"
language, unable to say "Do this twenty times: ..."  Furthermore, it
describes the structure of the document it is a part of - as a markup
language, that
 exactly what it's for.  It does not describe well something else, outside its
 own file, as the proposed notion of having an XML script describe a
geometric model or complete scene.   

  Ultimately, symbols mean what you want them to mean. Of course it's
possible to use XML to describe scenes - just like it's possible to write ray
 tracers in COBOL.  But why?  *Possible* isn't enough for me - I want *easy,
elegant, effortless and enjoyable.*  

Perhaps XML would be useful as an intermediate language between 
programs, though I don't see how it would be a good choice.  There are
simpler ways to describe geometry, textures and scenes already in use.   
If someone wants to use XML, okay, but I dont' want to see it.

Eventually, of course the geometric model really does become a large number
of independent objects in POV-Rays data structures, suitable for hit-testing
and rendering.  It would be neat if POV-Ray could directly read this level
of data in - but i suspect XML would require much more effort than some
format that is command-oriented, saying in effect "Create Cylinder with 
radius=xxx, endpoints=..."  You know, with *VERBS*...

Are we seeing in this thread a contrast between POV-Ray users who are 
more mathematically minded - who usually prefer static descriptive 
models of things, using logical categories and relations, and those
who are deep down primarily artists - who perhaps prefer ACTION, 
MOTION and MEANING but don't mind trying describing these 
mathematically as pov script?

IMOH, we must cater to artists, not to parser writers.



Final thought:  What if the same argument for marking up scene files as 
XML were to be applied to  C++?  Syntaxic elements of C++ source 
files could be made into XML tags - what would that look like?  Would
anyone like that?   Scary...

*shudder me too*




Daren Scot Wilson
dar### [at] pipelineocm
www.newcolor.com
-- 
Daren Scot Wilson
dar### [at] pipelineocm
www.newcolor.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.